package masterlink.futures.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="CLOSEDATE")
public class CloseDate implements Serializable{
	private static final long serialVersionUID = -4981192210174226875L;
	@Id
	private String spmonth;
	@Column(name="sdate")
	private String sdate;
	@Column(name="edate")
	private String edate;
	public String getSpmonth() {
		return spmonth;
	}
	public void setSpmonth(String spmonth) {
		this.spmonth = spmonth;
	}
	public String getSdate() {
		return sdate;
	}
	public void setSdate(String sdate) {
		this.sdate = sdate;
	}
	public String getEdate() {
		return edate;
	}
	public void setEdate(String edate) {
		this.edate = edate;
	}
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("CloseDate [spmonth=");
		builder.append(spmonth);
		builder.append(", sdate=");
		builder.append(sdate);
		builder.append(", edate=");
		builder.append(edate);
		builder.append("]");
		return builder.toString();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((edate == null) ? 0 : edate.hashCode());
		result = prime * result + ((sdate == null) ? 0 : sdate.hashCode());
		result = prime * result + ((spmonth == null) ? 0 : spmonth.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CloseDate other = (CloseDate) obj;
		if (edate == null) {
			if (other.edate != null)
				return false;
		} else if (!edate.equals(other.edate))
			return false;
		if (sdate == null) {
			if (other.sdate != null)
				return false;
		} else if (!sdate.equals(other.sdate))
			return false;
		if (spmonth == null) {
			if (other.spmonth != null)
				return false;
		} else if (!spmonth.equals(other.spmonth))
			return false;
		return true;
	}
	
}
